home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
pc
/
files
/
mac
/
ez_dove.hqx
/
EZ Dove
/
EZ DOVE .002 (BAS)
< prev
next >
Wrap
Text File
|
1990-02-12
|
10KB
|
261 lines
'EZ DOVE v.002, by N5KOB. 12 Feb. 1990.
'decodes TLM telemetry from DOVE-1 ham radio satellite.
DEFINT a-Z
GOSUB Helper
WINDOW 1, "DOVE-1 Decoder", ,1
Initialize:
RESTORE 'reset DATA pointer
MENU 1,0,1,"File"
MENU 1,1,1,"Help"
MENU 1,2,1,"Start"
MENU 1,3,1,"Quit"
MENU 1,4,1, "AMSAT"
CALL TEXTSIZE (12)
GOSUB OpenInputFile
GOSUB OpenOutputFile
MakeHeader:
GOSUB HeaderMaker
LINE INPUT#1, InLine$ 'dummy command
MakeMainResults:
RowNum = 2: ColumnNum = 1: NumTelemValues = 58
Read8Lines: 'creates BigLine$
BigLine$ = ""
FOR M=1 TO 8
LINE INPUT #1, InLine$
BigLine$ = BigLine$ + InLine$
NEXT M
GOSUB FindValueToDecode
CALL TEXTSIZE (10): LOCATE 22,30: PRINT "All Done"
CLOSE #1: CLOSE #2
GOTO JustWaiting
'------------------------------------------------------------
AmsatInfo:
WINDOW 3, "AMSAT Info", (100,65)-(370,175),-4
CALL TEXTSIZE(10)
PRINT "If you develop an interest in amateur satellites, you"
PRINT "might want to join AMSAT, P.O. Box 27, Washington,"
PRINT "D.C. 20044. (You can call them at (301) 589-6062"
PRINT "and join with Visa or MasterCard.) They publish an"
PRINT "excellent newsletter and have publications and"
PRINT "software for beginners and experienced enthusiasts."
PRINT " Click in this window to continue"
MOUSE ON
i=0: WHILE i=0: ON MOUSE GOSUB Dummy5: WEND
RETURN
Dummy5:
WINDOW CLOSE 3
MOUSE OFF
i=1
RETURN
'-----------------
AssembleAnswerLine:
AnswerLine$ = VariableName$ + "= " + STR$(Result!) + " " + Units$
AnswerLineFile$ = VariableName$ + CHR$(9) + STR$(Result!) + CHR$(9) + Units$
RETURN
'---------------
CalcValues:
TelemDecimal=VAL("&H" + TelemHex$) 'converts hex to decimal
Result! = (ACoeff!*TelemDecimal^2) + (BCoeff!*TelemDecimal) + CCoeff!
RETURN
'---------------
EndlessLoop:
WHILE 1=1: WEND
'---------------
ErrorMessage1: 'if string = 1023 characters, goto ErrorMessage1
PRINT "Sorry, a line has been encountered in the input file that has more than 1022"
PRINT "characters without a carriage return. This program cannot handle that."
PRINT "a situation like that. You may wish to enter a Return character in the file"
PRINT "with a word processor and start over. Bye bye."
GOTO Initialize
'---------------
FindValueToDecode:
FOR L=1 TO LEN(BigLine$)-2
ColonIHope$ = MID$(BigLine$,L,1)
IF ColonIHope$ <> ":" GOTO Dummy1 'you haven't found a colon yet
TelemHex$ = MID$(BigLine$,L+1,2) 'here's the telemetry to decode
Test$ = MID$(BigLine$,L-2,2)
IF Test$ = "LM" GOTO Dummy1 'handles the colon after "TLM:"
IF Test$ = "US" GOTO Dummy3 'handles the colon after "STATUS:"
IsRightItem: 'xxx
GOSUB GetDATAValues 'xxx
GOSUB CalcValues
GOSUB AssembleAnswerLine
GOSUB OutputAnswerLine 'to screen and file
Dummy1:
NEXT L
Dummy3: 'all done
RETURN
'---------------
GetDATAValues:
'ON ERROR STOP 'xxx, could restore
READ IDNum$, VariableName$, CCoeff!, BCoeff!, ACoeff!, Units$
RETURN
'---------------
HeaderMaker:
SearchString$= "Time is": SStringLen = 7: GOSUB SearchForString
Header$ = MID$(InLine$ ,SStringPos ,32) 'get 32 characters that tell date & time
CALL TEXTSIZE(12): LOCATE 1, 12: PRINT Header$
IF FileOut$ <> "" THEN PRINT #2, Header$ 'write time & date to file, if there is one
RETURN
'---------------
Helper:
WINDOW 2, "Help Screen", (15,45)-(450,335),-4
CALL TEXTSIZE(10)
PRINT " EZ Dove v. 002"
PRINT " Based upon information received from Robert McGwier, N4HY."
PRINT " Written in Microsoft QuickBASIC, version 1.0, for the Macintosh"
PRINT
PRINT " This program decodes some of the telemetry that you can receive from the DOVE ham"
PRINT "radio satellite, launched in early 1990. To obtain telemetry to decode you will need a"
PRINT "receiver capable of tuning 145.825 MHz, a Terminal Node Controller (TNC), and a"
PRINT "computer."
PRINT " When you run this program, it will ask you to select the file of telemetry data to be"
PRINT "decoded. It will then ask you if you want to save the data to an output file, so that you"
PRINT "can import it to a spreadsheet. Then it will start the decoding process."
PRINT " Decoding may seem to take a very long time, but actually the main slow-down is that"
PRINT "the program is looking for the line of telemetry that tells the time. Hint: If you erase"
PRINT "any lines ahead of the one with the time, Mr. Mac won't have to look so far."
PRINT " The telemetry that this program decodes is in the TLM lines from DOVE. If they are"
PRINT "garbled, unpredictable results may occur."
PRINT " If you would like more information about amateur radio, please ask a local ham or"
PRINT "write the American Radio Relay League, 225 Main St., Newington CT 06111. You will"
PRINT "be glad you did!"
PRINT " Miles Abernathy, N5KOB @ KB5PM.#STX.TX.USA.NA"
PRINT
PRINT " Click mouse";
MOUSE ON
i=0: WHILE i=0: ON MOUSE GOSUB Dummy4: WEND
RETURN
Dummy4:
WINDOW CLOSE 2
MOUSE OFF
i=1
RETURN
'--------------
'InputErrorHandler: xxx
CLOSE #1
IF ERR = 23 THEN GOTO ErrorMessage1
PRINT "Programmer error #"; ERR; ".": GOSUB LongDelay
STOP
'---------------
JustWaiting:
MENU ON: ON MENU GOSUB MenuHandler: GOTO JustWaiting
MenuHandler:
MenuNumber = MENU(0)
MenuItem = MENU(1)
MENU 'de-highlights menu
ON MenuNumber <> 1 GOTO Quitter
ON MenuItem GOSUB Helper, Initialize, Quitter, AmsatInfo
RETURN
'---------------
LongDelay:
t!=TIMER + 10: WHILE t!>TIMER: WEND: RETURN
'---------------
OpenInputFile:
LOCATE 1,14: PRINT "Select input file of DOVE telemetry."
FileIn$=FILES$ (1, "TEXT")
IF FileIn$ = "" THEN GOTO Quitter
CLS
OPEN FileIn$ FOR INPUT AS #1
RETURN
'---------------
OpenOutputFile:
LOCATE 1,5: PRINT "Do you want to save the decoded telemetry to a file?"
FileOut$=FILES$ (0, "Save output as")
IF FileOut$ = "" THEN CLS: RETURN
CLS
OPEN FileOut$ FOR OUTPUT AS #2
RETURN
'---------------
OutputAnswerLine:
CALL TEXTSIZE (9)
RowNum = RowNum + 1
IF RowNum > 22 THEN RowNum = 3: ColumnNum = ColumnNum + 27
LOCATE RowNum, ColumnNum: PRINT AnswerLine$ 'print to screen
IF FileOut$ <> "" THEN PRINT #2, AnswerLineFile$ 'write to file, if there is one
RETURN
'---------------
Quitter:
MENU RESET
END
'--------------
SearchForString: 'finds first occurrence of a string in the file
InLineNum = 0
WHILE NOT EOF(1)
'ON ERROR GOTO InputErrorHandler xxx
LINE INPUT#1, InLine$
InLineNum=InLineNum + 1
SStringPos=0
FOR J=1 TO LEN(InLine$) 'finds first occurrence of SearchString$ in the line
CharMenu$ = "Char "+ STR$ (J): LineMenu$ = " Line" + STR$ (InLineNum)
MENU 3,0,0,LineMenu$: MENU 4, 0, 0, CharMenu$
IF SearchString$=MID$(InLine$,J,SStringLen) THEN
SStringPos=J
J=LEN(InLine$)
RETURN
END IF
NEXT J
WEND
RETURN
'---------------
DATA "00", Rx E/F Audio(W), 0, .0246, 0, V(p-p)
DATA "01", Rx E/F Audio(N), 0, .0246, 0, V(p-p)
DATA "02", Mixer Bias, 0, .0102, 0, Volts
DATA "03", Oscillator Bias, 0, .0102, 0, Volts
DATA "04", Rx A Audio(W), 0, .0246, 0, V(p-p)
DATA "05", Rx A Audio(N), 0, .0246, 0, V(p-p)
DATA "06", "Rx A DISC ", 10.427, -.09274, 0, kHz
DATA "07", Rx A S Meter, 0, 1, 0, Counts
DATA "08", Rx E/F DISC, 9.6234, -.09911, 0, kHz
DATA "09", Rx E/F S Meter, 0, 1, 0, Counts
DATA "0A", +5 volt bus, 0, .0305, 0, Volts
DATA "0B", +5V Rx Current, 0, .1, 0, mA
DATA "0C", +2.5 volt VREF, 0, .0108, 0, Volts
DATA "0D", "8.5 volt bus ", 0, .0391, 0, Volts
DATA "0E", IR Detector, 0, 1, 0, Counts
DATA "0F", LO Monitor I, 0, .037, 0, mA
DATA "10", +10 volt bus, 0, .05075, 0, Volts
DATA "11", GASFET Bias I, 0, .026, 0, mA
DATA "12", Ground REF, 0, .01, 0, Volts
DATA "13", +Z Array voltage, 0, .1023, 0, Volts
DATA "14", "Rx Temp ", 101.05, -.6051, 0, íC
DATA "15", +X (RX) Temp, 101.05, -.6051, 0, íC
DATA "16", Bat. 1 volts, 1.7932, -.0034084, 0, Volts
DATA "17", Bat. 2 volts, 1.7978, -.0035316, 0, Volts
DATA "18", Bat. 3 volts, 1.8046, -.0035723, 0, Volts
DATA "19", Bat. 4 volts, 1.7782, -.0034590, 0, Volts
DATA "1A", Bat. 5 volts, 1.8410, -.0038355, 0, Volts
DATA "1B", Bat. 6 volts, 1.8381, -.0038450, 0, Volts
DATA "1C", Bat. 7 volts, 1.8568, -.0037757, 0, Volts
DATA "1D", Bat. 8 volts, 1.7868, -.0034068, 0, Volts
DATA "1E", Array voltage, 7.205, .072, 0, Volts
DATA "1F", +5 volt bus, 1.932, .0312, 0, Volts
DATA "20", +8.5 volt bus, 5.265, .0173, 0, Volts
DATA "21", +10 volt bus, 7.469, .021765, 0, Volts
DATA "22", BCR set point, -8.762, 1.159, 0, Counts
DATA "23", BCR load I, -.0871, .00698, 0, Amps
DATA "24", +8.5V bus I, -.0092, .001899, 0, Amps
DATA "25", +5 V bus cur., .00502, .00431, 0, Amps
DATA "26", -X array cur., -.01075, .00215, 0, Amps
DATA "27", +X array cur., -.01349, .00270, 0, Amps
DATA "28", -Y array cur., -.01196, .00239, 0, Amps
DATA "29", +Y array cur., -.01141, .00228, 0, Amps
DATA "2A", -Z array cur., -.01653, .00245, 0, Amps
DATA "2B", +Z array cur., -.01137, .00228, 0, Amps
DATA "2C", Ext. Power cur., -.02, .00250, 0, Amps
DATA "2D", BCR Input cur., .06122, .00317, 0, Amps
DATA "2E", BCR Output cur., -.01724, .00345, 0, Amps
DATA "2F", Battery 1 temp, 101.05, -.6051, 0, íC
DATA "30", Battery 2 temp, 101.05, -.6051, 0, íC
DATA "31", Baseplate temp, 101.05, -.6051, 0, íC
DATA "32", FM TX#1 RF out, .0256, -.000884, .0000836, Watt
DATA "33", FM TX#2 RF out, -.0027, .001257, .0000730, Watt
DATA "34", PSK TX HPA temp, 101.05, -.6051, 0, íC
DATA "35", +Y array temp, 101.05, -.6051, 0, íC
DATA "36", RC PSK HPA temp, 101.05, -.6051, 0, íC
DATA "37", RC PSK BP temp, 101.05, -.6051, 0, íC
DATA "38", +Z array temp, 101.05, -.6051, 0, íC
DATA "39", S band TX out, -.0451, .00403, 0, Watts
DATA "3A", S band HPA temp, 101.05, -.6051, 0, íC